package com.adapter.demo4;

import com.adapter.demo4.ads.DBSocketInterface;
import com.adapter.demo4.ads.GBSocketInterface;

public class SocketAdapter implements DBSocketInterface {// 实现旧接口

	// 组合新接口
	private GBSocketInterface gbSocket;

	/**
	 * 在创建适配器对象时，必须传入一个新街口的实现类
	 *
	 * @param gbSocket
	 */
	public SocketAdapter(GBSocketInterface gbSocket) {
		this.gbSocket = gbSocket;
	}

	@Override
	public void powerWithTwoRound() {
		gbSocket.powerWithThreeFlat();
	}

}
